"use strict";
const crypto = require("crypto");
module.exports = (app) => {
    const { STRING, INTEGER, DATE, ENUM } = app.Sequelize;
    // 配置（重要：一定要配置详细，一定要！！！）
    const XiProfit = app.model.define("xi-profit", {
        id: {
            type: INTEGER(30).UNSIGNED,
            primaryKey: true,
            autoIncrement: true
        },
        content: {
            type: STRING(2000),
            allowNull: false,
            defaultValue: '0',
            comment: '内容',
        },
        code: {
            type: STRING(200),
            allowNull: false,
            defaultValue: 0,
            comment: '编号',
        },
        price: {
            type: STRING(200),
            allowNull: false,
            defaultValue: '',
            comment: '交易金额',
        },
        created_at: DATE,
        updated_at: DATE,

    });

    // 定义关联关系
    // XiProfit.associate = function (model) {
    //     XiProfit.hasOne(app.model.CouponsCollar);
    //     XiProfit.belongsTo(app.model.WxUser);
    // };
    return XiProfit;
};
